package de.szut.ita13sommerfeld.blockadventure.window;

import java.awt.Dimension;
import java.awt.Point;

import javax.swing.JFrame;

public class Window extends JFrame {

	private static final long serialVersionUID = 1L;

	public Window(int width, int height, String title, Game game) {
		
		game.setPreferredSize(new Dimension(width, height));
		game.setMaximumSize(new Dimension(width, height));
		game.setMinimumSize(new Dimension(width, height));
		
		setTitle(title);
		add(game);
		pack();
		setDefaultCloseOperation(Window.EXIT_ON_CLOSE);
		setResizable(false);
		setLocation(new Point(100,100));
		
		game.start();
		
	}
}
